﻿<link rel="stylesheet" href="modules/IShopstore/pnjavascript/validateform/css/general.css" type="text/css" media="screen" />   
<script type="text/javascript" src="modules/IShopstore/pnjavascript/validateform/validation.js"></script>
<!--[if $action eq 'detailPage']-->	
	<!--[if $itemLists neq FALSE]-->
	<h4>ตะกร้าสินค้า</h4>
		<table class="table">   
			<tr>
				<th>
					<span>รหัสสินค้า</span>
				</th>
				<th>
					<span>รูปสินค้า</span>
				</th>
				<th>
					<span>ชื่อสิ้นค้า</span>
				</th>
				<th>
					<span>ราคา/บาท</span>
				</th>
				<th>
					<span>จำนวน</span>
				</th>
				<th>
					<span>รวม</span>
				</th>
			</tr>
    <!--[assign var="tempSummary" value=0]--> 			
		<!--[foreach from=$itemLists item=item]-->
			<tr>
				<td>
					<!--[$item.item_ref_id]-->
				</td>
				<td>
					<div class="img"><img src="<!--[$item.firstthumbname]-->" width="100"><div>
				</td>
				<td>
					<!--[$item.title]-->
				</td>
				<td>
					<!--[$item.price]-->
				</td>
				<td>
					<!--[$item.amount]-->
				</td>
				<td>
					<!--[$item.amount*$item.price]-->
				</td>
			</tr>
			<!--[math assign="summaryPrice" equation="x*y"  x=$item.amount y=$item.price]-->
				<!--[math assign="summary" equation="x+y"  x=$summaryPrice y=$tempSummary]-->
				<!--[assign var="tempSummary" value=$summary]-->   			
			<!--[/foreach]-->
			<tr>
				<td colspan="4" align="center">
					ราคารวมทั้งหมด
				</td>				
				<td colspan="2" align="right">
					<!--[$summary|number_format:0]--> บาท
				</td>		
			</tr>		
		</table>
		<a class="checkout" href="<!--[$nextURL]-->">สั่งชื่อสินค้า</a>
		<a class="shopping" href="index.php">เลือกสินค้าต่อ</a>
	<!--[/if]-->
<!--[/if]-->

<!--[if $action eq 'formPage']-->
	<h4>Contact Information</h4>
	<form id="customForm" 
		  class="orderInformation" 
		  method="post"
		  action="<!--[pnmodurl modname="IShopStore" type="user" func="checkout" action="completed"]-->"  
	>
		<div>
			<label for="orderer">orderer</label>
			<input id="orderer" name="form[orderer]" type="text" />
			<span id="ordererInfo"></span>
		</div>
		<div>
			<label for="phone_number">phone_number</label>
			<input id="phone_number" name="form[phone_number]" type="text" />
			<span id="phone_numberInfo"> </span>
		</div>  
		<div>
			<label for="email">email</label>
			<input id="email" name="form[email]" type="text" />
			<span id="emailinfo"> </span>
		</div>  
		<div>
			<label for="house_no">House no</label>
			<input id="house_no" name="form[house_no]" type="text" />
			<span id="house_noInfo"> </span>
		</div>  
		<div>
			<label for="moo">Moo</label>
			<input id="moo" name="form[moo]" type="text" />
			<span id="mooInfo"></span>
		</div>
		<div>
			<label for="soi">Soi</label>
			<input id="soi" name="form[soi]" type="text" />
			<span id="soiInfo"></span>    
		</div>
		<div>
			<label for="road">Road</label>  
			<input id="road" name="form[road]" type="text" />
			<span id="roadInfo"> </span>
		</div>  
		<div>
			<label for="village">Village</label>  
			<input id="village" name="form[village]" type="text" />
			<span id="villageInfo"></span>
		</div>  
		<div>
			<label for="tambon">Tambon</label>  
			<input id="tambon" name="form[tambon]" type="text" />
			<span id="tambonInfo"></span>
		</div>  
		<div>
			<label for="district">District</label>  
			<input id="district" name="form[district]" type="text" />
			<span id="districtInfo"></span>
		</div>  
		<div>
			<label for="province">Province</label>  
			<input id="province" name="form[province]" type="text" />
			<span id="provinceInfo"></span>
		</div>   
		<div>
			<label for="postcode">Zipcode</label>  
			<input id="postcode" name="form[zipcode]" type="text" />
			<span id="postcodeInfo"></span>
		</div>      
		<BR>
		<input id="send" type="submit" value="Next">  </input>        
	</form>
<!--[/if]-->

<!--[if $action eq 'completed']-->
	<!--[if $isComplete]-->
		Completed
	<!--[else]-->
		Failed: Some problem.
	<!--[/if]-->
<!--[/if]-->
